﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Architecture.CrossCutting.Web.WCF;
using Architecture.CrossCutting.LoggingEntities.Logger;

namespace Architecture.CrossCutting.LoggingEntitiesTests
{
    [TestClass]
    public class WcfLoggerTest
    {
        [TestMethod]
        public void TestWriteInfo()
        {
            DateTime pipelineStarted = DateTime.UtcNow;

            WcfClientLog log = new WcfClientLog()
            {
                Action = "TestAction",
                IsFault = false,
                OperationName="TestOperation",
                PipeLineDuration = 600,
                PipeLineStarted = pipelineStarted,
                PipeLineEnded = pipelineStarted.AddMilliseconds(600),
                RequestLength = 150,
                RequestSended = pipelineStarted.AddMilliseconds(10),
                ResponseLength = 1000,
                ResponseReceived = pipelineStarted.AddMilliseconds(510),
                SerializationDuration = 90,
                TransportDuration = 510
            };

            WcfClientLogger logger = new WcfClientLogger();
            logger.WriteInfo("test", log);


        }
    }
}
